<include file="Public/head"/>
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
table th{
    font-size: 18px;
    color:#000;
}
table td{
    font-size: 15px;
    /*color:#000;*/
}

</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                    <div class="row">
                    <div class="col-xs-12">

                        <div style="margin-top:1%;"></div>
                        <!-- <form id="form" method="post" action="{:U('set')}" > -->
                        <table class="table table-hover" >
                            <thead>
                                <tr>
<!--                                     <th class="center"><input class="check-all" type="checkbox" value=""></th>
 -->
                                    <!-- <th class="center">id</th> -->
                                    <th class="center">姓名</th>
                                    <th class="center">绩效月</th>
                                    <th class="center">所属部门/岗位</th>
                                    <!-- <th class="center">所属岗位</th> -->
                                    <th class="center">战略目标</th>
                                    <th class="center">衡量指标</th>
                                    <th class="center">权重</th>
                                    <th class="center">目标值</th>
                                    <th class="center">计分规则</th>

                                    <th class="center">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php if(empty($list)): ?>
                                    <tr>
                                        <td colspan="14" class="center" style="font-size:19px;">暂无考核表</td>
                                    </tr>
                                <?php else: ?>
                                    <volist name="list" id="v">
                                        <!-- <form action="" id="formid"></form> -->
                                            <tr>
                                               <!--  <td class="center">
                                                    <input class="uids" type="checkbox" name="uids[]" value="{$v['id']}">
                                                </td> -->
                                                <!-- <td class="center">{$v.pid}</td> -->
                                                <td class="center">{$v.uname}</td>
                                                <td class="center">{$time} - {$v.yue}/月</td>
                                                <td class="center">{$v.ment}</td>
                                                <td class="center"><b>{$v.target}</b></td>
                                                <td class="center"><b>{$v.norm}</b></td>
                                                <td class="center"><b>{$v.weight}%</b></td>
                                                <td class="center"><b>{$v.value}</b></td>
                                                <td class="center"><b>{$v.rule}</b></td>
                                                <td class="center"><button  onclick="xuan({$v.id},this)" class="layui-btn layui-btn-danger layui-btn-radius">设置评分人</button></td>
                                                <!-- <td style="display:none">{$v.uname}</td> -->
                                                <!-- <td style="display:none">{$v.yue}</td> -->
                                                <!-- <td style="display:none">设置评分人</td> -->
                                               
                                                <!-- <td class="center">{$v.post}</td> -->
                                               
                                                
                                               
                                            </tr>  
                                        
                                    </volist>
                                <?php endif ?>
                                
                            </tbody>
                        </table>
                        <!-- </form> -->


                    </div>
                    </div>
                    
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/qwadmin/js/function.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">

function xuan(id,obj)
{
    // console.log(obj);
    // console.log(id);
    // var yue = $(obj).parent().prev().text();
    // var ment = $(obj).parent().prev().prev().text();
    // var num = $(obj).parent().prev().prev().prev().text();
    // var rule = $(obj).parent().prev().prev().prev().prev().text();
    // var value = $(obj).parent().prev().prev().prev().prev().prev().text();
    // var weight = $(obj).parent().prev().prev().prev().prev().prev().prev().text();
    // var norm = $(obj).parent().prev().prev().prev().prev().prev().prev().prev().text();
    // var target = $(obj).parent().prev().prev().prev().prev().prev().prev().prev().prev().text();
    // var angle = $(obj).parent().prev().prev().prev().prev().prev().prev().prev().prev().prev().text();
    // var m_type = $(obj).parent().prev().prev().prev().prev().prev().prev().prev().prev().prev().prev().text();
    // console.log(angle);
    // $('#angle').val(angle);
    // $('#target').val(target);
    // $('#norm').val(norm);
    // $('#weight').val(weight);
    // $('#value').val(value);
    // $('#rule').val(rule);
    // $('#num').val(num);
    // $('#ment').val(ment);
    // $('#yue').val(yue);
    $('#id').val(id);
    // $('#m_type').val(m_type);
    // // console.log($('#angle').val());
    layer.open({
        type: 1,
        title:  ['对应人选择', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['1000px', '600px'], //宽高
        content: $('#dao'),
        // btn:'按钮'
    });

}


function set()
{
    //询问框
    layer.confirm('确定选择么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('setnei')}",
             data:$('#xform').serialize(),// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                console.log(msg);
                if (msg == 1111) {
                    layer.msg('添加成功~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('添加失败！', {icon: 2});
                }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });   
            
}

</script>
</body>
</html>


                    <div id="dao" style="display:none;">
                            <div class="checkbox" style="margin-left:20px;">
                                <form action="" id="xform">
                                    <!-- <input type="hidden" name="m_type" id="m_type"> -->
                                    <input type="hidden" name="pid" id="id">
                                   <!--  <input type="hidden" name="angle" id="angle">
                                    <input type="hidden" name="target" id="target">
                                    <input type="hidden" name="norm" id="norm">
                                    <input type="hidden" name="weight" id="weight">
                                    <input type="hidden" name="value" id="value">
                                    <input type="hidden" name="rule" id="rule">
                                    <input type="hidden" name="num" id="num">
                                    <input type="hidden" name="ment" id="ment">
                                    <input type="hidden" name="yue" id="yue"> -->
                                     <volist name="ulist" id="item" >
                                        <b style="font-size:18px;">{$key}  :</b>
                                        <volist name="item" id="v">
                                            <label>
                                                <input type="checkbox" <?php if(in_array($v['user'],$pname)) {echo 'checked';} ?> name="user[]" value="{$v.user}" ><span style="font-size:16px;">{$v.user}</span>
                                            </label>&nbsp&nbsp&nbsp
                                        </volist>
                                        <br/>-------------------------<br>  
                                     </volist>
                                     
                                </form>
                                <div style="margin-top:5%;margin-left:45%;background-color:#66B3FF;width:70px;text-align:center;height:30px;line-height:30px;border:1px solid #66B3FF;box-shadow: 3px 3px 10px #ADADAD;color:#fff;cursor:pointer;font-size:16px;" onclick="set()">确定</div>
                            </div>


                    </div>